﻿using PoemGame.Domain.Seedwork;

namespace PoemGame.Domain.GameAggregate
{
    /// <summary>
    /// 游戏类型
    /// </summary>
    public class GameType : ValueObject
    {
        /// <summary>
        /// "主类型", "比如飞花令、对诗、接龙等"
        /// </summary>
        public string MainType { get; private set; }
        /// <summary>
        /// "次类型", "比如超级飞花令、两字飞花令等"
        /// </summary>
        public string SubType { get; private set; }

        /// <summary>
        /// 
        /// </summary>
        private GameType()
        {

        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="mainType"></param>
        /// <param name="subType"></param>
        public GameType(string mainType, string subType)
        {
            MainType = mainType;
            SubType = subType;
        }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        protected override IEnumerable<object> GetEqualityComponents()
        {
            yield return MainType;
            yield return SubType;
        }
    }
}
